<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Add a word to personal word list</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.enchant-dict-add-to-personal" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">enchant_dict_add_to_personal</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PECL enchant &gt;= 0.1.0 )</p><p class="refpurpose"><span class="refname">enchant_dict_add_to_personal</span> &mdash; <span class="dc-title">Add a word to personal word list</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.enchant-dict-add-to-personal-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>enchant_dict_add_to_personal</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$dict</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$word</code></span>
   ) : <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   Add a word to personal word list of the given dictionary.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.enchant-dict-add-to-personal-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">dict</code></dt>

     <dd>

      <p class="para">
       Dictionary resource
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">word</code></dt>

     <dd>

      <p class="para">
       The word to add
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.enchant-dict-add-to-personal-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.enchant-dict-add-to-personal-examples">
   <div class="example" id="example-2880">
    <p><strong>Example #1 Adding a word to a PWL</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'./my_word_list.pwl'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$word&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Supercalifragilisticexpialidocious'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$broker&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_broker_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$dict&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_broker_request_pwl_dict</span><span style="color: #007700">(</span><span style="color: #0000BB">$broker</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$filename</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">enchant_dict_add_to_personal</span><span style="color: #007700">(</span><span style="color: #0000BB">$dict</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$word</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">enchant_broker_free</span><span style="color: #007700">(</span><span style="color: #0000BB">$broker</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.enchant-dict-add-to-personal-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="enchant_broker_request_pwl_dict.html" class="function" rel="rdfs-seeAlso">enchant_broker_request_pwl_dict()</a> - Creates a dictionary using a PWL file</span></li>
    <li class="member"><span class="function"><a href="enchant_broker_request_dict.html" class="function" rel="rdfs-seeAlso">enchant_broker_request_dict()</a> - Create a new dictionary using a tag</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>